# FROM ubuntu
# ENV MY_SERVICE_PORT=80
# ENV MY_SERVICE_PORT1=80
# ENV MY_SERVICE_PORT2=80
# ENV MY_SERVICE_PORT3=80
# LABEL multi.label1="value1" multi.label2="value2" other="value3"
# ADD bin/amd64/httpserver /httpserver
# EXPOSE 80
# ENTRYPOINT /httpserver

# 作业修改

# 构建镜像基础镜像

FROM golang:1.19 AS build

WORKDIR /work3.2/

COPY . .

RUN CG__ENABLE=0 GOOS=linux go build -o httpserver .


# 运行镜像基础镜像

FROM busybox

COPY --from=build /work3.2/httpserver /work3.2/httpserver

EXPOSE 80

WORKDIR /work3.2/

ENTRYPOINT ["./httpserver"]